﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Xml;

namespace D8_ControlTemplate
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            List<Student> ls = new List<Student>
            {
                new Student(){Id = 1, Name = "Tim", Age = 25},
                new Student(){Id = 2, Name = "Tom", Age = 20},
                new Student(){Id = 3, Name = "Kiven", Age = 25},
                new Student(){Id = 4, Name = "Joey", Age = 32},
                new Student(){Id = 5, Name = "Bob", Age = 18},
                new Student(){Id = 6, Name = "Mei", Age = 41},
                new Student(){Id = 7, Name = "Chandler", Age = 33},
            };

        }
    }

    public class L2BConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            int textLenght = (int)value;
            return textLenght > 6;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
